package com.mdb.open.common.enums.trade.type;

import com.mdb.bc.api.enums.ApiEnum;

/**
 * @description: 附件类型
 * @author: zhengzonghui
 * @create: 2019-06-26 12:20
 **/
public enum AttachFileTradeTypeEnum implements ApiEnum<String> {


    OVERSEA_CONTRACT("海外合同") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.OVERSEA_CONTRACT;
        }
    },
    EXPORTED_CONTRACT("出口合同") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.EXPORTED_CONTRACT;
        }
    },
    PURCHASE_CONTRACT("采购合同") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.PURCHASE_CONTRACT;
        }
    },
    SALES_CONFIRMATION("销售确认书") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.SALES_CONFIRMATION;
        }
    },
    CUSTOMS_DECLARATION("报关单") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.CUSTOMS_DECLARATION;
        }
    },
    EXPORTED_INVOICE("出口发票") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.EXPORTED_INVOICE;
        }
    },
    CONTAINER_LOAD_PLAN("装箱单") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.CONTAINER_LOAD_PLAN;
        }
    },
    PARTICULAR_PAPER("验货/装柜单") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.PARTICULAR_PAPER;
        }
    },
    TRANSIT("海关放行通知书") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.TRANSIT;
        }
    },
    BILL_LADING("提单") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.BILL_LADING;
        }
    },
    VAT_INVOICE("增值税发票") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.VAT_INVOICE;
        }
    },
    DEPOSIT_EXCHANGE_MEMO("定金水单") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.DEPOSIT_EXCHANGE_MEMO;
        }
    },
    EXPORTED_VERIFICATION_SLIP("出口核销单") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.EXPORTED_VERIFICATION_SLIP;
        }
    },
    OTHERS("其他证明文件") {
        @Override
        public AttachFileTypeEnum getAttachFileTypeEnum() {
            return AttachFileTypeEnum.OTHERS;
        }
    },

    ;



    AttachFileTradeTypeEnum(String text) {
        this.text = text;
    }


    //枚举描述
    private String text;
    /**
     * 分组函数
     *
     * @return
     */
    public abstract AttachFileTypeEnum getAttachFileTypeEnum();

    /**
     * 是否不允许为空
     *
     * @return
     */
    public boolean isAllowNull() {
        return false;
    }


    @Override
    public String getValue() {
        return this.name();
    }

    @Override
    public String getText() {
        return this.text;
    }


}